<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TPopup类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_popup-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TPopup类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TPopup 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_popup.png" usemap="#TPopup_map" alt=""/>
  <map id="TPopup_map" name="TPopup_map">
<area href="class_t_window_base.html" alt="TWindowBase" shape="rect" coords="0,56,91,80"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:afa0efc9eb619f840cb1bbf71e9491ff5"><td class="memItemLeft" align="right" valign="top"><a id="afa0efc9eb619f840cb1bbf71e9491ff5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TPopup</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:afa0efc9eb619f840cb1bbf71e9491ff5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72350c1148d8953b311f317e72ab6d7a"><td class="memItemLeft" align="right" valign="top"><a id="a72350c1148d8953b311f317e72ab6d7a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TPopup</b> (const popup_t *nativeObj)</td></tr>
<tr class="separator:a72350c1148d8953b311f317e72ab6d7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64b77b0dc6516379f65b6ec56bab9d1e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_popup.html#a64b77b0dc6516379f65b6ec56bab9d1e">SetCloseWhenClick</a> (bool close_when_click)</td></tr>
<tr class="separator:a64b77b0dc6516379f65b6ec56bab9d1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbb3c9e67ec7eb310fd1e693f27804fc"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_popup.html#acbb3c9e67ec7eb310fd1e693f27804fc">SetCloseWhenClickOutside</a> (bool close_when_click_outside)</td></tr>
<tr class="separator:acbb3c9e67ec7eb310fd1e693f27804fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a948cca418cf3a839631d81c08f69cfd8"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_popup.html#a948cca418cf3a839631d81c08f69cfd8">SetCloseWhenTimeout</a> (uint32_t close_when_timeout)</td></tr>
<tr class="separator:a948cca418cf3a839631d81c08f69cfd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c82ed2ae98ad14a540b8c1316ce8209"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_popup.html#a6c82ed2ae98ad14a540b8c1316ce8209">GetCloseWhenClick</a> () const</td></tr>
<tr class="separator:a6c82ed2ae98ad14a540b8c1316ce8209"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff8e2a2d1db7794131766bb2099cea6b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_popup.html#aff8e2a2d1db7794131766bb2099cea6b">GetCloseWhenClickOutside</a> () const</td></tr>
<tr class="separator:aff8e2a2d1db7794131766bb2099cea6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae45edfa3bf27e1902b22414bdfab2cc4"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_popup.html#ae45edfa3bf27e1902b22414bdfab2cc4">GetCloseWhenTimeout</a> () const</td></tr>
<tr class="separator:ae45edfa3bf27e1902b22414bdfab2cc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_t_window_base"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_t_window_base')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="class_t_window_base.html">TWindowBase</a></td></tr>
<tr class="memitem:a8ee82f7d1d7c5d8ec69d3013587ad497 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top"><a id="a8ee82f7d1d7c5d8ec69d3013587ad497"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TWindowBase</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a8ee82f7d1d7c5d8ec69d3013587ad497 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf3bcfc0b3a710b7b466c2b16446123c inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top"><a id="abf3bcfc0b3a710b7b466c2b16446123c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TWindowBase</b> (const window_base_t *nativeObj)</td></tr>
<tr class="separator:abf3bcfc0b3a710b7b466c2b16446123c inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a601f1606bf5af9351729e8cf6d9a66b3 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a601f1606bf5af9351729e8cf6d9a66b3">GetTheme</a> () const</td></tr>
<tr class="separator:a601f1606bf5af9351729e8cf6d9a66b3 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46d951598e105b9c6aa80fa6e53706ff inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a46d951598e105b9c6aa80fa6e53706ff">GetDesignW</a> () const</td></tr>
<tr class="separator:a46d951598e105b9c6aa80fa6e53706ff inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bca0cab9285276672d16692edba6407 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a2bca0cab9285276672d16692edba6407">GetDesignH</a> () const</td></tr>
<tr class="separator:a2bca0cab9285276672d16692edba6407 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae379a459962d16f4bf860f7ef1c3057e inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#ae379a459962d16f4bf860f7ef1c3057e">GetAutoScaleChildrenX</a> () const</td></tr>
<tr class="separator:ae379a459962d16f4bf860f7ef1c3057e inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41ab3e34f57ee7c879a76acdf4c3f89b inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a41ab3e34f57ee7c879a76acdf4c3f89b">GetAutoScaleChildrenY</a> () const</td></tr>
<tr class="separator:a41ab3e34f57ee7c879a76acdf4c3f89b inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51f2e0f3a08ba2504da880552579cc18 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a51f2e0f3a08ba2504da880552579cc18">GetAutoScaleChildrenW</a> () const</td></tr>
<tr class="separator:a51f2e0f3a08ba2504da880552579cc18 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae141e242773aedf8d7c23b8e18bf16e9 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#ae141e242773aedf8d7c23b8e18bf16e9">GetAutoScaleChildrenH</a> () const</td></tr>
<tr class="separator:ae141e242773aedf8d7c23b8e18bf16e9 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe3c785954bb7f9b36aef0c8404791b7 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#abe3c785954bb7f9b36aef0c8404791b7">GetDisableAnim</a> () const</td></tr>
<tr class="separator:abe3c785954bb7f9b36aef0c8404791b7 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a785e621ad5b45b66df5407042c967f95 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">window_closable_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a785e621ad5b45b66df5407042c967f95">GetClosable</a> () const</td></tr>
<tr class="separator:a785e621ad5b45b66df5407042c967f95 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a999ec9d1a83b966a1dca2d41bcbbe61f inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a999ec9d1a83b966a1dca2d41bcbbe61f">GetOpenAnimHint</a> () const</td></tr>
<tr class="separator:a999ec9d1a83b966a1dca2d41bcbbe61f inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a916fe8622c4e893c76fd3a505eb898d8 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a916fe8622c4e893c76fd3a505eb898d8">GetCloseAnimHint</a> () const</td></tr>
<tr class="separator:a916fe8622c4e893c76fd3a505eb898d8 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c891e673ad398018e950b2123518096 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a2c891e673ad398018e950b2123518096">GetMoveFocusPrevKey</a> () const</td></tr>
<tr class="separator:a2c891e673ad398018e950b2123518096 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a779b72528696980bc6e8216f975b7552 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a779b72528696980bc6e8216f975b7552">GetMoveFocusNextKey</a> () const</td></tr>
<tr class="separator:a779b72528696980bc6e8216f975b7552 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08702c73171683fadc8cfcdd88a9b78b inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a08702c73171683fadc8cfcdd88a9b78b">GetMoveFocusUpKey</a> () const</td></tr>
<tr class="separator:a08702c73171683fadc8cfcdd88a9b78b inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a298b383e463a6c6855e4789b97329649 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a298b383e463a6c6855e4789b97329649">GetMoveFocusDownKey</a> () const</td></tr>
<tr class="separator:a298b383e463a6c6855e4789b97329649 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2812b0aec83f6358c93382ade42251cb inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a2812b0aec83f6358c93382ade42251cb">GetMoveFocusLeftKey</a> () const</td></tr>
<tr class="separator:a2812b0aec83f6358c93382ade42251cb inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75401bad5c3a209a65087ed952347dc4 inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a75401bad5c3a209a65087ed952347dc4">GetMoveFocusRightKey</a> () const</td></tr>
<tr class="separator:a75401bad5c3a209a65087ed952347dc4 inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7479c5141435482973ac4b63442a0f8f inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a7479c5141435482973ac4b63442a0f8f">GetAppletName</a> () const</td></tr>
<tr class="separator:a7479c5141435482973ac4b63442a0f8f inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a082ad83c9a08b9d78f44dd096aab22cb inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a082ad83c9a08b9d78f44dd096aab22cb">GetSingleInstance</a> () const</td></tr>
<tr class="separator:a082ad83c9a08b9d78f44dd096aab22cb inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a160b7cba70f8d0d093802b2a15b7af4d inherit pub_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_window_base.html#a160b7cba70f8d0d093802b2a15b7af4d">GetStronglyFocus</a> () const</td></tr>
<tr class="separator:a160b7cba70f8d0d093802b2a15b7af4d inherit pub_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a418c6c15b8cad92c6b43830f9aad4a08"><td class="memItemLeft" align="right" valign="top"><a id="a418c6c15b8cad92c6b43830f9aad4a08"></a>
static <a class="el" href="class_t_popup.html">TPopup</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a418c6c15b8cad92c6b43830f9aad4a08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f171543ba66778766e8bd8c9fc80839"><td class="memItemLeft" align="right" valign="top"><a id="a8f171543ba66778766e8bd8c9fc80839"></a>
static <a class="el" href="class_t_popup.html">TPopup</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:a8f171543ba66778766e8bd8c9fc80839"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aced04a2ef7182fa01f05c6a3a2f4131b"><td class="memItemLeft" align="right" valign="top"><a id="aced04a2ef7182fa01f05c6a3a2f4131b"></a>
static <a class="el" href="class_t_popup.html">TPopup</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:aced04a2ef7182fa01f05c6a3a2f4131b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94e744651e726831619fa3d11e08198e"><td class="memItemLeft" align="right" valign="top"><a id="a94e744651e726831619fa3d11e08198e"></a>
static <a class="el" href="class_t_popup.html">TPopup</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a94e744651e726831619fa3d11e08198e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9faa3e8005038964d1877233b24297d3"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_popup.html#a9faa3e8005038964d1877233b24297d3">Create</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a9faa3e8005038964d1877233b24297d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_class_t_window_base"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_class_t_window_base')"><img src="closed.png" alt="-"/>&#160;静态 Public 成员函数 继承自 <a class="el" href="class_t_window_base.html">TWindowBase</a></td></tr>
<tr class="memitem:a3fb2635fa070697e58c5ded7fc379f9a inherit pub_static_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top"><a id="a3fb2635fa070697e58c5ded7fc379f9a"></a>
static <a class="el" href="class_t_window_base.html">TWindowBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a3fb2635fa070697e58c5ded7fc379f9a inherit pub_static_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9257e5853c911e1b72be7c3e284a86bc inherit pub_static_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top"><a id="a9257e5853c911e1b72be7c3e284a86bc"></a>
static <a class="el" href="class_t_window_base.html">TWindowBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:a9257e5853c911e1b72be7c3e284a86bc inherit pub_static_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96c2165d59c4e3468f4e4a3369132f9a inherit pub_static_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top"><a id="a96c2165d59c4e3468f4e4a3369132f9a"></a>
static <a class="el" href="class_t_window_base.html">TWindowBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:a96c2165d59c4e3468f4e4a3369132f9a inherit pub_static_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b0b15eadef758ff6d7adea4b88128b3 inherit pub_static_methods_class_t_window_base"><td class="memItemLeft" align="right" valign="top"><a id="a2b0b15eadef758ff6d7adea4b88128b3"></a>
static <a class="el" href="class_t_window_base.html">TWindowBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a2b0b15eadef758ff6d7adea4b88128b3 inherit pub_static_methods_class_t_window_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>弹出窗口。</p>
<p>弹出窗口是一种特殊的窗口，大小和位置可以自由设置，主要用来实现右键菜单和combo_box的下列列表等功能。</p>
<p>popup_t是window\_base\_t的子类控件，window_base_t的函数均适用于popup_t控件。</p>
<p>在xml中使用"popup"标签创建弹出窗口。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">popup</span> <span class="keyword">close_when_click_outside</span>=<span class="stringliteral">&quot;true&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;c&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;m&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;80%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;80&quot;</span></div>
<div class="line">*&lt;<span class="keywordtype">list_view</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span>  <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">item_height</span>=<span class="stringliteral">&quot;30&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">scroll_view</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;view&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span>  <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;-12&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;100%&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">combo_box_item</span> <span class="keyword">tr_text</span>=<span class="stringliteral">&quot;english&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">combo_box_item</span> <span class="keyword">tr_text</span>=<span class="stringliteral">&quot;chinese&quot;</span> /&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">scroll_view</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">scroll_bar_d</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;bar&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;right&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;12&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">value</span>=<span class="stringliteral">&quot;0&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">list_view</span>&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">popup</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p></p>
</blockquote>
<p>更多用法请参考：<a href="https://github.com/zlgopen/awtk/blob/master/design/default/ui/">popup</a></p>
<p>在c代码中使用函数popup_create创建弹出窗口。如：</p>
<blockquote class="doxtable">
<p>创建之后，和使用普通窗口是一样的。 </p>
</blockquote>
<blockquote class="doxtable">
<p>完整示例请参考：<a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/combo_box.c">combo_box.c</a> </p>
</blockquote>
<p>可用通过style来设置控件的显示风格，如字体的大小和颜色等等。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">popup</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;default&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span> <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">popup</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：<a href="https://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml#L324">theme  default</a> </p>
</blockquote>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a9faa3e8005038964d1877233b24297d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9faa3e8005038964d1877233b24297d3">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TPopup::Create </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建popup对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>popup对象。 </dd></dl>

</div>
</div>
<a id="a6c82ed2ae98ad14a540b8c1316ce8209"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c82ed2ae98ad14a540b8c1316ce8209">&#9670;&nbsp;</a></span>GetCloseWhenClick()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TPopup::GetCloseWhenClick </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>点击时是否关闭窗口。 </p>

</div>
</div>
<a id="aff8e2a2d1db7794131766bb2099cea6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff8e2a2d1db7794131766bb2099cea6b">&#9670;&nbsp;</a></span>GetCloseWhenClickOutside()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TPopup::GetCloseWhenClickOutside </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>点击到窗口外时是否关闭窗口。 </p>

</div>
</div>
<a id="ae45edfa3bf27e1902b22414bdfab2cc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae45edfa3bf27e1902b22414bdfab2cc4">&#9670;&nbsp;</a></span>GetCloseWhenTimeout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t TPopup::GetCloseWhenTimeout </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>超时后自动关闭窗口(ms)。 </p>

</div>
</div>
<a id="a64b77b0dc6516379f65b6ec56bab9d1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64b77b0dc6516379f65b6ec56bab9d1e">&#9670;&nbsp;</a></span>SetCloseWhenClick()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TPopup::SetCloseWhenClick </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>close_when_click</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置点击时是否关闭窗口。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">close_when_click</td><td>点击时是否关闭窗口。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="acbb3c9e67ec7eb310fd1e693f27804fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbb3c9e67ec7eb310fd1e693f27804fc">&#9670;&nbsp;</a></span>SetCloseWhenClickOutside()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TPopup::SetCloseWhenClickOutside </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>close_when_click_outside</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置点击窗口外部时是否关闭窗口。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">close_when_click_outside</td><td>点击窗口外部时是否关闭窗口。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a948cca418cf3a839631d81c08f69cfd8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a948cca418cf3a839631d81c08f69cfd8">&#9670;&nbsp;</a></span>SetCloseWhenTimeout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TPopup::SetCloseWhenTimeout </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>close_when_timeout</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置超时关闭时间(ms)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">close_when_timeout</td><td>大于0时，为定时器时间(ms)，超时关闭窗口。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
